<?php

require('httpheader.php');
require('../install/mysqldb.php');
header('Content-Type:application/json; charset=utf-8');

if($cin && $_GET){
    mysqli_select_db($cin,"hongbao");
    date_default_timezone_set('PRC');
    $id = $_GET["id"];
    $userlist = mysqli_query($cin,"SELECT * FROM userinfo WHERE id=$id");
    // var_dump($userlist);
    $results = array();
    if($userlist->num_rows){
        $dele = mysqli_query($cin,"DELETE FROM userinfo WHERE id=$id");
        if($dele){
            $results["code"] ="200";
            $results["text"] = "删除成功";
        }else{
            $results["text"] = "删除失败";

        }
    echo json_encode($results);
    }
}

// {
    //         uid: 12,
    //         username: '马炸天',
    //         imgurl: 2207352916,
    //         backpostion: Random.natural(0, 9),
    //         datetime: 1631462400000
    //     },

?>